package com.wn.class30.service.impl;

import com.wn.class30.entity.MyorderDetail;
import com.wn.class30.entity.MyorderDetailExample;
import com.wn.class30.entity.MyorderExample;
import com.wn.class30.mapper.MyorderDetailDao;
import com.wn.class30.service.OrderDetailService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrderDetailServiceImpl implements OrderDetailService {
    @Resource
    private MyorderDetailDao myorderDetailDao;

    @Override
    public List<MyorderDetail> selectOrderDetailsByMyOrderId(Integer myOrderId) throws Exception {
        MyorderDetailExample myorderDetailExample = new MyorderDetailExample();
        myorderDetailExample.createCriteria().andMyorderIdEqualTo(myOrderId);
        return myorderDetailDao.selectByExample(myorderDetailExample);
    }
}
